<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            * {
                margin: 0;
                padding: 0;
                list-style: none;
            }
            ul {
                width: 300px;
                height: 300px;
                display: grid;
                gap: 2px;
                grid-template-rows: repeat(3, 1fr);
                grid-template-columns: repeat(3, 1fr);
                grid-template-areas: "header center footer" "header center footer" "header center footer";
                grid-auto-flow: column;
                margin: 100px auto;
                border: 1px solid red;
            }

            li {
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: brown;
                box-sizing: border-box;
                background-clip: content-box;
                color: #fff;
                font-size: 2em;
            }
        </style>
    </head>
    <body>
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
        </ul>
    </body>
</html>
